home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / BUSINESS / CTS30_1.ARJ / SWAPMEM.DOC < prev    next >
Text File  |  1989-04-09  |  5KB  |  126 lines

  1.                             SWAP Version 1.2
  2.      (c) Copyright 1988-1989 Nico Mak and Mansfield Software Group
  3.                           All rights reserved
  4.                              March 5, 1989
  5.  
  6. SWAP provides an application independent method for one MS-DOS
  7. application to run another, even if both would normally not fit in
  8. memory at the same time.  A typical use is to temporarily swap out a
  9. text editor so that you can run memory hungry compilers, linkers, or
  10. even debuggers without losing your place in an editing session.
  11.  
  12. SWAP works by copying conventional memory used by the currently running
  13. application to expanded memory, extended memory, or to a disk file,
  14. thereby freeing conventional memory used by the application.  SWAP then
  15. runs the desired program before restoring the original environment.
  16.  
  17. SWAP is compatible with most MS-DOS programs.  However, before relying
  18. on it, you should test SWAP with your own configuration in case of
  19. conflicts with TSRs and other software.
  20.  
  21. SWAP operation and internals are detailed in an article in the April,
  22. 1989 issue of Dr. Dobb's Journal.  The article includes source code.
  23.  
  24. SWAP version 1.1 includes these new features:
  25.  
  26. - It will swap to extended memory if your system supports XMS (the
  27.   Extended Memory Specification).
  28. - SWAP is easier to use from Personal REXX (see the example below).
  29.  
  30. Version 1.2 includes these new features:
  31.  
  32. - If the -d and -x options are NOT used and if SWAP can't swap to EMS,
  33.   it will try to use XMS.  If it can't swap to XMS it will automatically
  34.   swap to disk.
  35.  
  36. - When swapping to disk, the process id of the program that gets swapped
  37.   out is included in the fileid, so that you can swap to disk
  38.   recursively.
  39.  
  40.                           SWAP command syntax
  41.  
  42. The SWAP command can be entered at the DOS prompt, or it can be part of
  43. the command string that your application sends to DOS to run another
  44. program.  See below for examples.
  45.  
  46. SWAP [options] command [command-parameters] [ > fileid]
  47.  
  48. Brackets indicate optional parameters.  Valid SWAP options are:
  49.  
  50. -C Copy redirected output to the console.
  51. -D Disk file C:\SWAPxxxx.TMP is used instead of expanded memory
  52.    (where xxxx is the process id of the program that gets swapped out).
  53. -F Forces SWAP to continue even if an interrupt vector points to the
  54.    program that gets swapped out.  Use this option when possible, but
  55.    only if you are sure that the program that gets swapped out does not
  56.    hook interrupt vectors.
  57. -Q Quiet operation.  Informational messages are not displayed.
  58. -R REXX interface - required when used from Personal REXX.
  59. -X XMS (extended) memory is used instead of expanded memory.
  60.  
  61. "command" is any command that can be issued at the DOS prompt.
  62. "command-parameters"  are parameters or options for the command.
  63. "fileid" is a DOS file or device to which output from command can be
  64. directed.
  65.  
  66.                                 Examples
  67.  
  68. Assume you have shelled to DOS from within your editor in order to
  69. compile a program.  If the command you normally use to assemble your
  70. program is
  71.  
  72.     MASM filename;
  73.  
  74. then the command to run your assembler with SWAP becomes
  75.  
  76.     SWAP MASM filename;
  77.  
  78. To run SWAP to swap out dBase and load your favorite editor, you could
  79. enter the dBase command
  80.  
  81.     RUN SWAP -F KEDIT filename
  82.  
  83. Alternately, you could at the following line to your CONFIG.DB file:
  84.  
  85.     TEDIT = SWAP.COM -F KEDIT.EXE
  86.  
  87. and subsequently enter the following dBASE command to edit a file:
  88.  
  89.     MODIFY COMMAND filename
  90.  
  91. To run SWAP in a REXX program to swap out Personal REXX, use the -R
  92. option.  For example,
  93.  
  94.     'SWAP -R -F dBase'
  95.  
  96. Note that SWAP cannot swap REXX out if REXX was made resident.
  97.  
  98.                                 -------
  99.  
  100. Copyright/License/Warranty:
  101.  
  102. This document and the program file SWAP.COM ("the software") are
  103. copyrighted by the author.  The copyright owner hereby licenses you to:
  104. use the software; make as many copies of the program and documentation
  105. as you wish; give such copies to anyone; and distribute the software and
  106. documentation via electronic means.  There is no charge for any of the
  107. above.
  108.  
  109. However, you are specifically prohibited from charging, or requesting
  110. donations, for any such copies, however made; and from distributing the
  111. software and/or documentation with commercial products without prior
  112. permission.
  113.  
  114. No copy of the software may be distributed or given away without this
  115. document; and this notice must not be removed.
  116.  
  117. There is no warranty of any kind, and the copyright owner is not liable
  118. for damages of any kind.  By using this free software, you agree to
  119. this.
  120.  
  121.                                 -------
  122.  
  123. Questions, comments, and suggestions are welcome.  You can contact me on
  124. CompuServe at 70056,241 or on BIX as Nico_Mak.  Alternately, you can
  125. write to me at P.O. Box 532, Storrs, CT 06268.
  126.